# encoding: utf-8
"""
@author: 夏洛
@QQ: 1972386194
@file: demo.py
"""

url = 'https://api.v4.tujudao.com/api/client/diaries?limit=10&page=4&place=COVER&is_me=0&collected=0&keywords=&keyword=&orderby=publish_date&created_member_id=&state=9'

import requests
from loguru import logger
def get_data():
    res =requests.get(url)
    items = res.json()
    data = items.get("message").get("data")
    for i in data:
        item = {}
        member = i.get('member')
        item['mobile'] = member.get("mobile")
        item['city'] = i.get('city')
        item['name'] = i.get('name')
        logger.info(item)

get_data()
